var htmlWebpackPlugin = require('html-webpack-plugin');

module.exports = {
	entry: {
		main: './js/hello.js',
		pl: './js/a.js'	
	},
	output: {
		path: __dirname + '/dist',
		filename: 'js/[name]-[chunkhash].js',
	},
	plugins: [
		new htmlWebpackPlugin({
			// use root index.html
			template: 'index.html',
			// create file and give a name
			filename: 'index-[hash].html',
			// create <script> label and insert head 
			inject: 'head' 
		})
	]
};